home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / agl103p.lha / src / agl / RCS / agl.h,v next >
Encoding:
Text File  |  1994-12-09  |  6.0 KB  |  417 lines

  1. head    1.2;
  2. branch    1.2.1.99;
  3. access;
  4. symbols;
  5. locks; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.2
  10. date    94.02.07.00.01.00;    author jason;    state Exp;
  11. branches
  12.     1.2.1.1;
  13. next    ;
  14.  
  15. 1.2.1.1
  16. date    94.03.29.05.31.04;    author jason;    state Exp;
  17. branches;
  18. next    1.2.1.2;
  19.  
  20. 1.2.1.2
  21. date    94.11.16.06.19.41;    author jason;    state Exp;
  22. branches;
  23. next    1.2.1.3;
  24.  
  25. 1.2.1.3
  26. date    94.12.09.05.27.24;    author jason;    state Exp;
  27. branches;
  28. next    ;
  29.  
  30.  
  31. desc
  32. @primary header for Amiga GL
  33. @
  34.  
  35.  
  36. 1.2
  37. log
  38. @Initial RCS Version
  39. @
  40. text
  41. @#include<exec/types.h>
  42. #include<exec/memory.h>
  43. #include<devices/gameport.h>
  44. #include<intuition/intuitionbase.h>
  45.  
  46. #include<stdlib.h>
  47. #include<stdio.h>
  48. #include<string.h>
  49. #include<math.h>
  50.  
  51. #ifdef __SASC
  52. #include<functions.h>
  53. #endif
  54.  
  55. #ifdef AZTEC_C
  56. #include<functions.h>
  57. #endif
  58.  
  59. #ifdef LATTICE
  60. #include<lattice_amiga.h>
  61. #define SEEK_CUR 1
  62. #endif
  63.  
  64. #include<gl.h>
  65. #include<device.h>
  66.  
  67. #define    PIE    3,14159265
  68. #define DEG .01745329    /* PIE/180.0 */
  69.  
  70. #define SCREENX        700     /* 720 */
  71. #define SCREENY        450     /* 450 */
  72. #define SCREENDEPTH    4       /* 4 */
  73.  
  74. #define MICE        FALSE    /* TRUE = second mouse active */
  75.  
  76. #define MAX_WINDOWS 10
  77. #define MAX_DEVICE    600        /* theoretically 20000 */
  78. #define QUEUE_SIZE    101        /* according to GL manual */
  79.  
  80. #define    GL_POINT    1
  81. #define    GL_LINE        2
  82. #define    GL_POLYGON    3
  83.  
  84. #define    MAX_POLY_VERTS        255
  85.  
  86. /* extra colors (not official GL) */
  87. #define DARKGREY    8
  88. #define PINK        9 
  89. #define LIGHTGREEN  10
  90. #define OLIVE       11
  91. #define LAVENDER    12
  92. #define PURPLE      13
  93. #define BLUEGREEN   14
  94. #define LIGHTGREY   15
  95.  
  96. #define CBLACK          0x000
  97. #define CRED            0xF00
  98. #define CGREEN          0x0F0
  99. #define CYELLOW         0xFF0
  100. #define CBLUE           0x00F
  101. #define CMAGENTA        0xF0F
  102. #define CCYAN           0x0FF
  103. #define CWHITE          0xFFF
  104. #define CDARKGREY       0x555
  105. #define CPINK           0xC77
  106. #define CLIGHTGREEN     0x7C7
  107. #define COLIVE          0x883
  108. #define CLAVENDER       0x77C
  109. #define CPURPLE         0x838
  110. #define CBLUEGREEN      0x388
  111. #define CLIGHTGREY      0xAAA
  112.  
  113. #ifdef NOT_EXTERN
  114. #define extern
  115. #endif
  116.  
  117. extern USHORT ColorMap[16]
  118. #ifdef NOT_EXTERN
  119.     ={
  120.     CBLACK,
  121.     CRED,
  122.     CGREEN,
  123.     CYELLOW,
  124.     CBLUE,
  125.     CMAGENTA,
  126.     CCYAN,
  127.     CWHITE,
  128.     CDARKGREY,
  129.     CPINK,
  130.     CLIGHTGREEN,
  131.     COLIVE,
  132.     CLAVENDER,
  133.     CPURPLE,
  134.     CBLUEGREEN,
  135.     CLIGHTGREY,
  136.     }
  137. #endif
  138. ;
  139.  
  140. extern struct Device *ConsoleDev;
  141.  
  142. extern struct IOStdReq IOStandardRequest;
  143. extern struct GfxBase *GfxBase;
  144. extern struct IntuitionBase *IntuitionBase;
  145. extern struct IntuiMessage *Message;
  146.  
  147. extern struct ViewPort *GLView;
  148. extern struct Window *GLWindow[MAX_WINDOWS];
  149. extern struct Screen *GLScreen;
  150.  
  151. extern struct TextAttr StdFont
  152. #ifdef NOT_EXTERN
  153.     ={
  154.     "JXEN.font",
  155.     7,
  156.     FS_NORMAL,
  157.     0
  158.     }
  159. #endif
  160. ;
  161.  
  162. extern struct NewScreen ScreenDef
  163. #ifdef NOT_EXTERN
  164.     ={
  165.     0,0,
  166.     SCREENX,SCREENY,SCREENDEPTH,
  167.     BLACK,WHITE,
  168.     HIRES | LACE,
  169.     CUSTOMSCREEN,
  170.     &StdFont,
  171.     "Amiga GL v1.02  by Jason Weber",
  172.     NULL,
  173.     NULL,
  174.     }
  175. #endif
  176. ;
  177.  
  178. extern struct NewWindow NextWindow;
  179. extern struct NewWindow DefaultWindow
  180. #ifdef NOT_EXTERN
  181.     ={
  182.     100,100,
  183.     SCREENX-200,SCREENY-200,
  184.     (UBYTE)(-1),(UBYTE)(-1),
  185.     CLOSEWINDOW | REFRESHWINDOW | ACTIVEWINDOW | INACTIVEWINDOW | MOUSEBUTTONS | RAWKEY,
  186.     SIMPLE_REFRESH | RMBTRAP,
  187.     NULL,
  188.     NULL,
  189.     NULL,
  190.     NULL,
  191.     NULL,
  192.     0,0,
  193.     SCREENX-1,SCREENY-1,
  194.     CUSTOMSCREEN,
  195.     }
  196. #endif
  197. ;
  198.  
  199. extern unsigned short AreaBuffer[MAX_WINDOWS][MAX_POLY_VERTS*5/2];
  200. extern PLANEPTR TempBuffer[MAX_WINDOWS];
  201. extern struct TmpRas TempRaster[MAX_WINDOWS];
  202. extern struct AreaInfo AInfo[MAX_WINDOWS];
  203.  
  204. extern struct BitMap BackBitMap[MAX_WINDOWS];
  205. extern short DoubleBuffered[MAX_WINDOWS],DoubleBufferSet[MAX_WINDOWS];
  206. extern struct RastPort *VisibleRPort,*DrawRPort,BackRPort[MAX_WINDOWS];
  207. extern struct TextFont *FontPtr;
  208.  
  209. extern short OneToOne[MAX_WINDOWS],Dimensions[MAX_WINDOWS];
  210. extern short DrawType,BgnLine;
  211. extern long CurrentPosX,CurrentPosY,CurrentHeight,CurrentWidth;
  212. extern long CurrentColor,Verts,CurrentWid;
  213. extern char TitleList[MAX_WINDOWS][100];
  214.  
  215. #undef extern
  216.  
  217. #include"prototypes.h"
  218. @
  219.  
  220.  
  221. 1.2.1.1
  222. log
  223. @Added RCS Header
  224. @
  225. text
  226. @a0 10
  227.  
  228. /******************************************************************************
  229.  
  230. $Id$
  231.  
  232. $Log$
  233.  
  234. ******************************************************************************/
  235.  
  236.  
  237. @
  238.  
  239.  
  240. 1.2.1.2
  241. log
  242. @lots more globals
  243. @
  244. text
  245. @d4 1
  246. a4 1
  247. $Id: agl.h,v 1.2.1.1 1994/03/29 05:31:04 jason Exp jason $
  248. d6 1
  249. a6 4
  250. $Log: agl.h,v $
  251.  * Revision 1.2.1.1  1994/03/29  05:31:04  jason
  252.  * Added RCS Header
  253.  *
  254. a14 1
  255. #include<graphics/gfxmacros.h>
  256. a43 4
  257. /* 4Sight User's Guide says the default minumum size is 80x40 */
  258. #define MIN_WINX    80
  259. #define MIN_WINY    40
  260.  
  261. d141 1
  262. a141 1
  263.     "Amiga GL v1.03  by Jason Weber",
  264. d155 1
  265. a155 2
  266. /*     NEWSIZE | CLOSEWINDOW | REFRESHWINDOW | ACTIVEWINDOW | INACTIVEWINDOW | MOUSEBUTTONS | RAWKEY, */
  267.     NEWSIZE | REFRESHWINDOW | ACTIVEWINDOW | INACTIVEWINDOW | MOUSEBUTTONS | RAWKEY,
  268. d162 1
  269. a162 1
  270.     MIN_WINX,MIN_WINY,
  271. d175 1
  272. d179 4
  273. a183 22
  274.  
  275. extern long CurrentPosX,CurrentPosY;
  276. extern long CurrentHeight,CurrentWidth;
  277. extern long CurrentColor;
  278. extern long Verts;
  279. extern long GLFocus;
  280. extern long CurrentWid;
  281.  
  282. extern short ViewPort[MAX_WINDOWS][4];
  283. extern short Clipped[MAX_WINDOWS];
  284. extern short Bordered[MAX_WINDOWS];
  285. extern short DoubleBuffered[MAX_WINDOWS];
  286. extern short DoubleBufferSet[MAX_WINDOWS];
  287. extern short Sizeable[MAX_WINDOWS];
  288. extern short RGBmodeOn[MAX_WINDOWS];
  289. extern short RGBmodeSet[MAX_WINDOWS];
  290. extern short OneToOne[MAX_WINDOWS];
  291. extern short Dimensions[MAX_WINDOWS];
  292. extern short RedoBorder[MAX_WINDOWS];
  293. extern short DrawType;
  294. extern short BgnLine;
  295. extern short BorderWidth,BorderHeight;
  296. @
  297.  
  298.  
  299. 1.2.1.3
  300. log
  301. @added globals for screen size
  302. @
  303. text
  304. @d1 1
  305. d4 1
  306. a4 4
  307. Copyright © 1994 Jason Weber
  308. All Rights Reserved
  309.  
  310. $Id: agl.h,v 1.2.1.2 1994/11/16 06:19:41 jason Exp jason $
  311. a6 3
  312.  * Revision 1.2.1.2  1994/11/16  06:19:41  jason
  313.  * lots more globals
  314.  *
  315. d26 1
  316. a26 1
  317. /* #include<functions.h> */
  318. a177 12
  319.  
  320. #ifdef NOT_EXTERN
  321.     extern short ScreenWidth=SCREENX;
  322.     extern short ScreenHeight=SCREENY;
  323.     extern short ScreenDeep=SCREENDEPTH;
  324. #else
  325.     extern short ScreenWidth;
  326.     extern short ScreenHeight;
  327.     extern short ScreenDeep;
  328. #endif
  329.  
  330.  
  331. a206 2
  332. extern short Maximization[MAX_WINDOWS][4];
  333.  
  334. @
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.